<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>

	<h:form id="contentForm" style="width:100%;">
	 	<p:menubar>
	 		<p:menuitem value="New" 	actionListener="#{activityGOBoundary.createGoal()}" icon="ui-icon-document" 
	 					update=":notificationGrowl,:contentForm,:#{p:component('goalDataList')}"/>
	 					
	 		<p:menuitem value="Save" 	actionListener="#{activityGOBoundary.updateGoal()}" icon="ui-icon-check" 
	 					update=":notificationGrowl,:contentForm,:#{p:component('goalDataList')} " rendered="#{activityGOBoundary.render_save_action}"/>
	 					 
           	<p:menuitem value="Delete" 	onclick="deleteConfirmDialog.show()" icon="ui-icon-trash" rendered="#{activityGOBoundary.render_delete_action}"/>
           	
           	<p:menuitem value="Close" 	onclick="closeConfirmDialog.show()" icon="ui-icon-closethick" rendered="#{activityGOBoundary.render_close_action}"/> 
		</p:menubar>
		<br></br>
		
		<p:panelGrid style="margin:auto;width:600px;" rendered="#{activityGOBoundary.render_goal}">  
		    <f:facet name="header">
		    	<p:row>  
		   			<p:column colspan="4">
		   				<h:outputLabel value="#{activityGOBoundary.title}"/>	
		   			</p:column>
		   		</p:row>	
		    </f:facet>
		    
		    <p:row>
		    	<p:column colspan="1" style="width:10%;">
		    		<h:outputLabel value="Title" />
		    	</p:column>
		    	<p:column colspan="3" style="width:90%;">
		    		<p:inputText value="#{activityGOBoundary.title}" label="Title" style="width:98%" /> 				
		    	</p:column>		
		    </p:row>
		    
		    <p:row>
		    	<p:column colspan="1" style="width:10%;">
		    		<h:outputLabel value="Status:" />  																
		    	</p:column>
		    	<p:column colspan="3" style="width:90%;">
		    		<h:outputLabel value="#{activityGOBoundary.status}" />  																
		    	</p:column>		
		    </p:row>
		    
		    <p:row>
		    	<p:column colspan="1" style="width:10%;">
		    		<h:outputLabel value="Focus" />
		    	</p:column>	
		    	<p:column colspan="1" style="width:40%">
		    		<p:inputText value="#{activityGOBoundary.focus}" label="Focus" style="width:90%"/> 								
		    	</p:column>	
		    	<p:column colspan="1" style="width:10%">
		    		<h:outputLabel value="Object" />  																
		    	</p:column>	
		   		<p:column colspan="1" style="width:40%">
		   			<p:inputText value="#{activityGOBoundary.object}" required="false" label="Object" style="width:90%"/>				
		   		</p:column>	
		    </p:row>
		    
		 	<p:row>
		 	 	<p:column colspan="1" style="width:10%;">
		 	 		<h:outputLabel value="Magnitude" />  																
		 	 	</p:column>	
		   	 	<p:column colspan="1" style="width:40%;">
		   	 		<p:inputText value="#{activityGOBoundary.magnitude}" required="false" label="Magnitude" style="width:90%"/>			
		   	 	</p:column>		    
		    	<p:column colspan="1" style="width:10%;">
		    		<h:outputLabel value="Timeframe" />  																
		    	</p:column>	
		    	<p:column colspan="1" style="width:40%;">
		    		<p:inputText value="#{activityGOBoundary.timeframe}" required="false" label="Object" style="width:90%"/>			
		    	</p:column>	
		 	</p:row>
	
		   	<p:row>
		   		<p:column colspan="1" style="width:10%;">
		   			<h:outputLabel value="Organizational Scope" />  													
		   		</p:column>
		    	<p:column colspan="1" style="width:40%;">
		    		<p:inputText value="#{activityGOBoundary.organizationalScope}" required="false" label="Object" style="width:90%"/>	
		    	</p:column>
		    	<p:column colspan="1" style="width:10%;">
		    		<h:outputLabel value="Constrains"/>																
		    	</p:column>
		    	<p:column colspan="1" style="width:40%;">
		    		<p:inputText value="#{activityGOBoundary.constraints}" required="false" label="Constrains" style="width:90%"/>		
		    	</p:column>
		   	</p:row>
		    
		    <p:row>
		    	<p:column colspan="1" style="width:10%;">
		    		<h:outputLabel  style="align:center" value="Description" />    					
		    	</p:column>
		    	<p:column colspan="3" style="width:80%;">
		    		<p:editor width="550" height="200" style="align:center" 
		    			      controls="bold italic underline style  size color highlight bullets numbering alignleft center alignright " 
		    		          value="#{activityGOBoundary.description}"/>
		    	</p:column> 
		    </p:row>
		 	
		 	<p:row>
		 		<p:column colspan="1" style="width:10%;">
		 			<h:outputLabel  style="align:center" value="GoalEnactor" />    					
		 		</p:column>
		 		<p:column colspan="3" style="width:90%;">
		 	 		<p:selectOneListbox style="width:550px;height:20px;" >
		 	 			<f:selectItem itemLabel="	#{activityGOBoundary.goalEnactor.username} - 
		 	 									 	#{activityGOBoundary.goalEnactor.firstName} - 
		 	 										#{activityGOBoundary.goalEnactor.lastName} - 
		 	 										#{activityGOBoundary.goalEnactor.role.title}" 
		 	 						  itemValue="#{activityGOBoundary.goalEnactor.id.toString()}" />  
        			</p:selectOneListbox>
        			<br/> 
        			<p:commandButton value="edit" icon="ui-icon-pencil" onclick="editEnactorDlg.show()" />
		 		</p:column>
		 	</p:row>
		 	
		 	<p:row>
		 		<p:column colspan="1" style="width:10%;">
		 			<h:outputLabel  style="align:center" value="SuperList" />    					
		 		</p:column>
		 		<p:column colspan="3" style="width:90%;">
		 	 		<p:selectOneListbox style="width:550px;height:100px" var="u" >  
						<f:selectItems value="#{activityGOBoundary.superList}" var="user" 
						               itemLabel="#{user.username} - 
						                          #{user.firstName} - 
						                          #{user.lastName} - 
						                          #{user.role.title}" 
						               itemValue="#{user.id.toString()}"/>
        			</p:selectOneListbox>
        			<br/>
        			<p:commandButton value="edit" icon="ui-icon-pencil" onclick="editSuperDlg.show()" />
		 		</p:column>
		 	</p:row>
   			<p:row>
		    	<p:column colspan="1" style="width:10%;">
		    		<h:outputLabel  style="align:center" value="Relations" />    					
		    	</p:column>
		    	<p:column colspan="3" style="width:80%;">
		    		<p:editor width="550" height="200" style="align:center" 
		    			      controls="bold italic underline style  size color highlight bullets numbering alignleft center alignright " 
		    		          value="#{activityGOBoundary.relations}"/>
		    	</p:column> 
		    </p:row>
	
		</p:panelGrid>
		
	</h:form> 	
	
	<ui:include src="DialogMessagesComponent.xhtml"></ui:include>
	<ui:include src="DialogEnactorEditComponent.xhtml"></ui:include>
	<ui:include src="DialogSuperEditComponent.xhtml"></ui:include> 
	
</ui:composition>
</html>